#pragma once
/*--------------------------------------------------------------------------------
 * Adaptive Intelligence - Foundation Framework Class Library
 * Version 2.00
 * 
 * Exception Event Arguments Class
 *		An event arguments class for exception-related events.
 *--------------------------------------------------------------------------*/

/*----------------------------------------------------------------------------
 * System Imports
 *--------------------------------------------------------------------------*/
#include "stdafx.h"
using namespace System;

namespace Adaptive
{
	namespace Foundation
	{
		/// <summary>
		/// An event arguments class for exception-related events.
		/// </summary>
		public ref class ExceptionEventArgs : public System::EventArgs
		{
		public:

			/*---------------------------------------------------------------------------
			 * Constructor/Dispose/Destructor Methods
			 *-------------------------------------------------------------------------*/
			#pragma region Constructor/Dispose/Destructor Methods
			/// <summary>
			/// Initializes a new instance of the class.
			/// </summary>
			/// <remarks>
			/// This is the default constructor.
			/// </remarks>
			ExceptionEventArgs();
			/// <summary>
			/// Initializes a new instance of the class.
			/// </summary>
			/// <param name="source">The source of the exception.</param>
			ExceptionEventArgs(String^ source);
			/// <summary>
			/// Initializes a new instance of the class.
			/// </summary>
			/// <param name="exceptionCaught">
			/// The <see cref="Exception"/> instance that was caught.
			/// </param>
			ExceptionEventArgs(Exception^ exceptionCaught);
			/// <summary>
			/// Initializes a new instance of the class.
			/// </summary>
			/// <param name="source">The source of the exception.</param>
			/// <param name="exception">
			/// The <see cref="Exception"/> instance that was caught.
			/// </param>
			ExceptionEventArgs(String^ source, Exception^ exception);
			/// <summary>
			/// Class destructor.
			/// </summary>
			~ExceptionEventArgs();
			#pragma endregion

			/*---------------------------------------------------------------------------
			 * Public Properties
			 *-------------------------------------------------------------------------*/
			#pragma region Public Properties
			/// <summary>
			/// Gets or sets the source of the exception.
			/// </summary>
			/// <value>
			/// A source description string.
			/// </value>
			property String^ Source {String^ get(); void set(String^ value); }
			/// <summary>
			/// Gets or sets the exception.
			/// </summary>
			/// <value>
			/// The exception that was caught.
			/// </value>
			property Exception^ ExceptionInstance {Exception^ get(); void set(Exception^ value); }
			#pragma endregion

		private:
			/*---------------------------------------------------------------------------
			 * Private Declarations
			 *-------------------------------------------------------------------------*/
			#pragma region Private Declarations
			/// <summary>
			/// Source of the method in which the exception occurred.
			/// </summary>
			String^ _source;
			/// <summary>
			/// Exception that was caught.
			/// </summary>
			Exception^ _exception;
			#pragma endregion
		};
	}
}

	